package com.animal.service.impl;


import com.animal.entity.pojo.AComment;
import com.animal.mapper.CommentMapper;
import com.animal.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentMapper commentMapper;
    @Override
    public List<AComment> selectAllComment(AComment aComment) {
        return commentMapper.selectAllComment(aComment);
    }

    @Override
    public AComment queryById(Integer id) {
        return commentMapper.queryById(id);
    }

    @Override
    public int updateComment(AComment comment) {
        return commentMapper.updateComment(comment);
    }

    @Override
    public int insertComment(AComment comment) {
        return commentMapper.insertComment(comment);
    }

    @Override
    public int deleteById(Integer id) {
        return commentMapper.deleteById(id);
    }

    @Override
    public List<AComment> geiCommentAllByUserName(String userName) {
        return commentMapper.geiCommentAllByUserName(userName);
    }
}
